<?php

namespace App\Model\Business;

use App\Model\Model;
use Carbon\Carbon;

class BlackDaily extends Model
{
    protected ?string $connection = "business";

    protected ?string $table = "black_daily";

    public static function findTodayByOaid($channel, $oaid)
    {
        return self::query()
            ->where("date", Carbon::today()->toDateString())
            ->where("channel", $channel)
            ->where("oaid", $oaid)
            ->first();
    }
}